]> dgit.raspbian.org Git - gnome-shell.git/commit
dbusErrors: Add utility module for handling remote errors
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 31 Jan 2024 15:28:24 +0000 (16:28 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Wed, 31 Jan 2024 19:58:31 +0000 (20:58 +0100)
commitca0ee2ae90e29ead3f8862c238d29aec5144949c
tree0dde3f544b3db8dd9e42e6c87a11ba701563135e
parenta5d33026f02d7b0e3fed7b9cfdb54ecedbd15eca
dbusErrors: Add utility module for handling remote errors

We sometimes return custom D-Bus errors. Right now those errors
are ad-hoc, which means receivers don't have a proper way of
checking whether a thrown GLib.Error corresponds to a particular
remote error.

In order to change that, we should define proper error enums and
domains, and register them with GDBus, so that there is an automatic
mapping between D-Bus errors and GLib.Errors.

The new module doesn't export any domains or enums yet, but provides
internal tooling to make these exports more convenient.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3159>
js/js-resources.gresource.xml
js/misc/dbusErrors.js [new file with mode: 0644]